package org.jeecg.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: sys_organization
 * @Author: jeecg-boot
 * @Date: 2021-10-29
 * @Version: V1.0
 */
@Data
@TableName("sys_organization")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "机构", description = "机构")
public class SysOrganization implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * organizatio表ID
     */
    @Excel(name = "机构ID", width = 15)
    @ApiModelProperty(value = "机构ID")
    @TableId(type = IdType.AUTO)
    private String organizationId;
    /**
     * 机构名称
     */
    @Excel(name = "机构名称", width = 15)
    @ApiModelProperty(value = "机构名称")
    private String name;
    /**
     * 简称
     */
    @Excel(name = "简称", width = 15)
    @ApiModelProperty(value = "简称")
    private String nickname;
    /**
     * 机构类型
     */
    @Excel(name = "机构类型", width = 15)
    @ApiModelProperty(value = "机构类型")
    @Dict(dicCode = "org_type")
    private Integer type;
    /**
     * 上级机构ID
     */
    @Excel(name = "上级机构ID", width = 15)
    @ApiModelProperty(value = "上级机构ID")
    @Dict(dictTable = "sys_organization", dicCode = "organization_id", dicText = "name")
    private String parentId;
    /**
     * 客户号
     */
    @Excel(name = "客户号", width = 15)
    @ApiModelProperty(value = "客户号")
    @Dict(dictTable = "scm_cus_info", dicCode = "cus_no", dicText = "cus_name")
    private Integer customerId;
    /**
     * 描述
     */
    @Excel(name = "描述", width = 15)
    @ApiModelProperty(value = "描述")
    private String description;
    /**
     * 状态
     */
    @Excel(name = "状态", width = 15)
    @ApiModelProperty(value = "状态")
    @Dict(dicCode = "org_status")
    private Integer status;
    /**
     * 修改用户
     */
    @ApiModelProperty(value = "修改用户")
    private String updateBy;
    /**
     * 修改时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
    /**
     * 创建用户
     */
    @ApiModelProperty(value = "创建用户")
    private String createBy;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
